################# Server Check Start #####################
umask 002

THIS_SERVER=`hostname`

#RND
case "${THIS_SERVER}" in "hpdev05")
export DIR_HOME=/userdir/liimapp/rnhim
export APP_INSTANCE=RND
esac

#PROD
case "${THIS_SERVER}" in "niimwas01")
export DIR_HOME=/userdir/liimapp/pnhim
export APP_INSTANCE=PROD
#export APP_NO=1
esac

#PROD
case "${THIS_SERVER}" in "niimwas02" )
export DIR_HOME=/userdir/liimapp/pnhim
export APP_INSTANCE=PROD
#export APP_NO=2
esac

################# Server Check End #####################

export AGENT_ROOT=Applications/NHImDstbtAgent
export AGENT_LIB=Applications/NHImDstbtAgent/lib
export AGENT_SRC=Applications/NHImDstbtAgent/src

export JAVA_HOME=/opt/java6
export CLASSPATH=.:${DIR_HOME}/${AGENT_LIB}/commons-pool-1.4.jar:${DIR_HOME}/${AGENT_ROOT}/bin:${DIR_HOME}/${AGENT_ROOT}/config:${DIR_HOME}/${AGENT_LIB}/classes12.jar
echo ${CLASSPATH}
echo JAVA_HOME : ${JAVA_HOME}

cd  ${DIR_HOME}/${AGENT_ROOT}/bin

nohup $JAVA_HOME/bin/java  -classpath $CLASSPATH -Dapp.instance=${APP_INSTANCE} -Xms64m -Xmx256m NHImDstbtAgent > /dev/null 2>&1 &
